<?php
include "../include/session.php";
include '../include/db.php';
include '../class/class.upload.php';
include "../include/config.php";
include "../include/global.php";
include "../class/user.php";
include "../class/product.php";
include "../class/news.php";
include "../class/city.php";
include "../class/intro.php";
include "../class/content.php";
include "../class/dealer.php";
include "../class/category.php";
$cat = new category ();
if ($_SESSION ["user_admin"] != '' && $_SESSION ["pass_admin"] != '') {
	$user->setusername ( $_SESSION ["user_admin"] );
	$user->setpassword ( $_SESSION ["pass_admin"] );
	$check_login = $user->checklogin ();
	if ($check_login == '')
		session_destroy ();
	$m = $_GET ["m"];
	$act = $_GET ["act"];
	if ($act == '')
		$act = 'view';
	include "templates/header.php";
	include "templates/topmenu.php";
	if ($m == '')
		include "templates/main.php";
	else
		include "templates/" . $m . "/" . $act . ".php";
	include "templates/leftmenu.php";
	include "templates/footer.php";

} else {
	session_destroy ();
	$main->redirect ( "login.php" );
}
?>